"""
Author: Lucas
Date: 2024-05-11 12:40:18
LastEditors: Lucas
LastEditTime: 2024-05-11 12:40:20
Description: file content
"""

from langchain_openai import AzureOpenAIEmbeddings

api_type = "azure"
emb_model = "ada"
emb_deployment_name = "ada"
emb_api_version = "2023-09-15-preview"
emb_api_key = "8bd7ca1fc91d4ba397f50e1dd4721b89"
emb_azure_endpoint = "https://gpt-emb.openai.azure.com/"


def get_embedding():
    lc_az_embedding = AzureOpenAIEmbeddings(
        azure_endpoint=emb_azure_endpoint,
        openai_api_key=emb_api_key,
        deployment=emb_deployment_name,
        openai_api_version=emb_api_version,
    )
    print("=== Langchain Azure Embedding 加载成功 ===")
    return lc_az_embedding


get_embedding()
